package com.lpj.base.id.generator.service.impl.bean;

/**
 * @author LiPengJu
 * @date: 2020/4/19
 */
public class MachineIdEntity {
    //机器id
    private Long id;
    //唯一id类型 0表示精确到秒 1表示精确到毫秒
    private Integer type;
    //分发机器Id的服务器时间
    private Long modifiedOn;
    //唯一id生成器上一次生成的本地时间
    private Long lastTimestamp;
    //机器id使用者的时间
    private Long userTimestamp;
    //唯一id生成器的ip
    private String ip;

    public MachineIdEntity(Long id, Integer type, Long modifiedOn, Long lastTimestamp, Long userTimestamp, String ip) {
        this.id = id;
        this.type = type;
        this.modifiedOn = modifiedOn;
        this.lastTimestamp = lastTimestamp;
        this.userTimestamp = userTimestamp;
        this.ip = ip;
    }

    public MachineIdEntity(Long id) {
        this.id = id;
    }

    public Long getUserTimestamp() {
        return userTimestamp;
    }

    public void setUserTimestamp(Long userTimestamp) {
        this.userTimestamp = userTimestamp;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getModifiedOn() {
        return modifiedOn;
    }

    public void setModifiedOn(Long modifiedOn) {
        this.modifiedOn = modifiedOn;
    }

    public Long getLastTimestamp() {
        return lastTimestamp;
    }

    public void setLastTimestamp(Long lastTimestamp) {
        this.lastTimestamp = lastTimestamp;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
